dojo.provide("miaigo.model.Node");

dojo.declare(
    "miaigo.model.Node",
    null,
    {
	_attrMap: null,

	constructor: function(createParam)
	{
	    if (createParam && createParam.attributes)
	    {
		this._attrMap = createParam.attributes;
	    }
	    else
	    {
		this._attrMap = {};
	    }
	},

	// Override to implement
	isMove: function()
	{
	    // Return true if this node contains a move
	},

	// Override to implement
	isSetup: function()
	{
	    // Return true if this node contains a setup
	},

	// Override to implement
	isInfo: function()
	{
	    // Return true if this node contains any
	    // information other than move or setup
	},

	// Override to implement
	_onAttributeChanged: function (/* String */attrName)
	{
	    // Called when an attribute changed its value
	},

	getAttribute: function(/* String */attrName)
	{
	    return this._attrMap[attrName];
	},

	setAttribute: function(/* String */attrName, /* Any */attrValue)
	{
	    this._attrMap[attrName] = attrValue;
	    this._onAttributeChanged(attrName);
	}
    });